package com.party.business.service.impl;

import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.party.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.party.business.mapper.SecurityIncidentsMapper;
import com.party.business.domain.SecurityIncidents;
import com.party.business.service.ISecurityIncidentsService;

/**
 * 安全事件Service业务层处理
 *
 * @author ruoyi
 * @date 2025-06-12
 */
@Service
public class SecurityIncidentsServiceImpl extends ServiceImpl<SecurityIncidentsMapper,SecurityIncidents>  implements ISecurityIncidentsService
{
    @Autowired
    private SecurityIncidentsMapper securityIncidentsMapper;

    /**
     * 查询安全事件
     *
     * @param id 安全事件主键
     * @return 安全事件
     */
    @Override
    public SecurityIncidents selectSecurityIncidentsById(String id)
    {
        return securityIncidentsMapper.selectSecurityIncidentsById(id);
    }

    /**
     * 查询安全事件列表
     *
     * @param securityIncidents 安全事件
     * @return 安全事件
     */
    @Override
    public List<SecurityIncidents> selectSecurityIncidentsList(SecurityIncidents securityIncidents)
    {
        return securityIncidentsMapper.selectSecurityIncidentsList(securityIncidents);
    }

    /**
     * 新增安全事件
     *
     * @param securityIncidents 安全事件
     * @return 结果
     */
    @Override
    public int insertSecurityIncidents(SecurityIncidents securityIncidents)
    {
                securityIncidents.setCreateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,new Date()));
            return securityIncidentsMapper.insertSecurityIncidents(securityIncidents);
    }

    /**
     * 修改安全事件
     *
     * @param securityIncidents 安全事件
     * @return 结果
     */
    @Override
    public int updateSecurityIncidents(SecurityIncidents securityIncidents)
    {
        return securityIncidentsMapper.updateSecurityIncidents(securityIncidents);
    }

    /**
     * 批量删除安全事件
     *
     * @param ids 需要删除的安全事件主键
     * @return 结果
     */
    @Override
    public int deleteSecurityIncidentsByIds(String[] ids)
    {
        return securityIncidentsMapper.deleteSecurityIncidentsByIds(ids);
    }

    /**
     * 删除安全事件信息
     *
     * @param id 安全事件主键
     * @return 结果
     */
    @Override
    public int deleteSecurityIncidentsById(String id)
    {
        return securityIncidentsMapper.deleteSecurityIncidentsById(id);
    }
}
